home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / mus / misc / MPEG_S_LAMEppc.lha / mpeg_s_LAME3.87 / HACKING < prev    next >
Text File  |  1980-09-26  |  1KB  |  44 lines

  1. First, see the file STYLEGUIDE
  2.  
  3.  
  4.  
  5. ************************************************************************
  6. LAME API
  7.  
  8. For a general outline of the code, see the file API.  
  9. Also, main.c is a simple front end to libmp3lame.a
  10.  
  11. The guts of the code are called from lame_encode_buffer().
  12.  
  13. lame_encode_buffer() handles buffering and resampling, and
  14. then calls lame_encode_frame() for each frame:
  15.  
  16. lame_encode_frame():
  17.    l3psycho_anal()        compute masking thresholds
  18.    mdct_sub()             compute MDCT coefficients
  19.    iteration_loop()       choose scalefactors (via iteration)
  20.                           which determine noise shapping, and 
  21.                           choose best huffman tables for lossless compression
  22.  
  23.    format_bitstream       format the bitstream.  when data+headers are complete,
  24.                           output to internal bit buffer.
  25.    copy_buffer()          copy internal bit buffer into user's mp3 buffer
  26.  
  27.  
  28.  
  29.  
  30. ************************************************************************
  31.  
  32. THREADSAFE:
  33.  
  34. Lame is supposed to be threadsafe.  But it is not yet.
  35.  
  36. Some static variables in takehiro.c need to be moved
  37. into lame_internal_flags (in util.h).  
  38.  
  39. There are a lot of static variables in timestatus.c,
  40. but these variables are only used by the output display.
  41. These routines should eventually be moved out of the library
  42. and into the front end.  So dont try to make this
  43. data thread safe!
  44.